package com.fr.report.core;

import com.fr.base.ColumnRow;
import com.fr.base.core.ComparatorUtils;
import java.io.Serializable;

public class ColumnRowIndex
  implements Cloneable, Serializable
{
  private ColumnRow columnRow;
  private int index;

  public ColumnRowIndex()
  {
  }

  public ColumnRowIndex(int paramInt1, int paramInt2, int paramInt3)
  {
    this(ColumnRow.valueOf(paramInt1, paramInt2), paramInt3);
  }

  public ColumnRowIndex(ColumnRow paramColumnRow, int paramInt)
  {
    this.columnRow = paramColumnRow;
    this.index = paramInt;
  }

  public int getIndex()
  {
    return this.index;
  }

  public void setIndex(int paramInt)
  {
    this.index = paramInt;
  }

  public ColumnRow getColumnRow()
  {
    return this.columnRow;
  }

  public void setColumnRow(ColumnRow paramColumnRow)
  {
    this.columnRow = paramColumnRow;
  }

  public boolean equals(Object paramObject)
  {
    if ((paramObject == null) || (!(paramObject instanceof ColumnRowIndex)))
      return false;
    ColumnRowIndex localColumnRowIndex = (ColumnRowIndex)paramObject;
    return ((ComparatorUtils.equals(localColumnRowIndex.getColumnRow(), this.columnRow)) && (localColumnRowIndex.getIndex() == this.index));
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    ColumnRowIndex localColumnRowIndex = (ColumnRowIndex)super.clone();
    localColumnRowIndex.setIndex(this.index);
    localColumnRowIndex.setColumnRow((ColumnRow)this.columnRow.clone());
    return localColumnRowIndex;
  }

  public String toString()
  {
    StringBuffer localStringBuffer = new StringBuffer();
    localStringBuffer.append("(").append(this.columnRow).append(",").append(this.index).append(")");
    return localStringBuffer.toString();
  }
}